package com.wfl.sampling.service;

import com.wfl.sampling.entity.WxchatOrderInformation;
import com.wfl.sampling.entity.WxchatPreOrder;
import com.wfl.sampling.entity.WxchatRefundInformation;

import java.util.List;


public interface WxChatOrderService {
    //预下单表
    void savePreOrderAll(WxchatPreOrder wxchatPreOrder);

    void updatePreOrderState(String state, String out_trade_no);

    List<WxchatPreOrder> findPreOrdersByOpenid(String openid);

    void saveOrderAll(WxchatOrderInformation wxchatOrderInformation);


    //订单表
    void updateOrder(String out_trade_no, String state);
    void deleteOrder(String out_trade_no);
    void deleteByOut_trade_no(String out_trade_no);
    List<WxchatOrderInformation> findOrdersByOpenid(String openid,String trade_state);


    //退款表
    void updateRefund(String out_trade_no, String state, String pay_refund);

    WxchatOrderInformation findOrderById(String id);

    void saveRefundAll(WxchatRefundInformation wxchatRefundInformation);

    void deleteRefund(String outTradeNo);

    List<WxchatRefundInformation> findRefundsByOpenid(String openid);

    WxchatRefundInformation findRefundById(String id);
}
